package 
{
	import app.IApp;
	import app.IAppBuilder;
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;
	import rssApp.builders.RssAppBuilder;
	
	/**
	 * ...
	 * @author Luke Van In
	 */
	[SWF(width="500", height="300", framerate="30", backgroundColor="#ffffff")]
	public class Main extends Sprite 
	{
		
		private var _app:IApp;
		
		
		public function Main():void 
		{
			if (stage) init();
			else addEventListener(Event.ADDED_TO_STAGE, init);
		}
		
		private function init(e:Event = null):void 
		{
			removeEventListener(Event.ADDED_TO_STAGE, init);
			// entry point
			
			// initialise stage
			this.stage.scaleMode = StageScaleMode.NO_SCALE;
			this.stage.align = StageAlign.TOP_LEFT;
			this.opaqueBackground = 0xffffff;
			
		
			var appBuilder:IAppBuilder = new RssAppBuilder(this.stage, this);
			
			this._app = appBuilder.buildApp();
		}
		
	}
	
}